<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: H:/project/LibTools/src/socket/TcpIoClient.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_9ad1227260954e346101f3844f0abb3d.html">socket</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">TcpIoClient.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_tcp_io_client_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef __TCPIOCLIENTEX_H__</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define __TCPIOCLIENTEX_H__</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_tcp_client_8h.html">./internal/TcpClient.h</a>&quot;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160; </div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<a class="code" href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="keyword">class </span><a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>;</div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160; </div>
<div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html">   11</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_c_tcp_io_client.html">CTcpIoClient</a></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;{</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;    <a class="code" href="class_c_tcp_io_client.html#a2e8d159bd627ceeda4d87f284ba23e6a">delete_class_copy_operator</a>(<a class="code" href="class_c_tcp_io_client.html">CTcpIoClient</a>);</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html#ae429cb6f2a0a0e7cea6ff0652acd92a0">   19</a></span>&#160;    <a class="code" href="class_c_tcp_io_client.html#ae429cb6f2a0a0e7cea6ff0652acd92a0">CTcpIoClient</a>(<span class="keywordtype">bool</span> isWriteLog = <span class="keyword">false</span>) {</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        <a class="code" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a>.<a class="code" href="class_shared_ptr.html#a0b0a4c8396bf40f91994f729855c0a5a">Reset</a>(<span class="keyword">new</span> <a class="code" href="class_c_tcp_client.html">CTcpClient</a>(isWriteLog));</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    }</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html#a965f48bb734bddf47d931d09cc502d92">   24</a></span>&#160;    <a class="code" href="class_c_tcp_io_client.html#a965f48bb734bddf47d931d09cc502d92">~CTcpIoClient</a>() {}</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html#ab6fce95f05e531d5c3a5d6a020b009ed">   32</a></span>&#160;    <a class="code" href="class_c_sock_error.html">CSockError</a> <a class="code" href="class_c_tcp_io_client.html#ab6fce95f05e531d5c3a5d6a020b009ed">Init</a>(<a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>&amp; sock, <span class="keywordtype">bool</span> isServer = <span class="keyword">false</span>) {</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a>-&gt;<a class="code" href="class_c_tcp_client.html#a9ed08affa5b7292535374a40bdb3a74b">Init</a>(*(<a class="code" href="class_c_socket.html">CSocket</a>*)(&amp;sock), isServer);</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    }</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; </div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html#a5108d1e20ddf728920483c7c7b071e3f">   45</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_client.html#a5108d1e20ddf728920483c7c7b071e3f">AsyncConnect</a>(<a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>&amp; sock, Func func) {</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <a class="code" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a>-&gt;<a class="code" href="class_c_tcp_client.html#a7f7c9ed8793c499fd560ca3af10a4e62">AsyncConnect</a>(*(<a class="code" href="class_c_socket.html">CSocket</a>*)(&amp;sock), <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ConnectHandleNull&lt;Func&gt;(func)), <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>);</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    }</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html#af68b6c887a2e48874d8172a7c206fe59">   49</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_client.html#af68b6c887a2e48874d8172a7c206fe59">AsyncConnect</a>(<a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>&amp; sock, Func func, <span class="keywordtype">void</span>* invoker){</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <a class="code" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a>-&gt;<a class="code" href="class_c_tcp_client.html#a7f7c9ed8793c499fd560ca3af10a4e62">AsyncConnect</a>(*(<a class="code" href="class_c_socket.html">CSocket</a>*)(&amp;sock), <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ConnectHandle&lt;Func&gt;(func)), invoker);</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    }</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html#a6802e9a74061274065a7a7f23687e30f">   63</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_client.html#a6802e9a74061274065a7a7f23687e30f">AsyncRead</a>(<a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>&amp; sock, <span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, Func func) {</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        <a class="code" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a>-&gt;<a class="code" href="class_c_tcp_client.html#adc52c7b2c3ef1653bdc00696a8713bcc">AsyncRead</a>(*(<a class="code" href="class_c_socket.html">CSocket</a>*)(&amp;sock), buff, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ReadHandleNull&lt;Func&gt;(func)), <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>);</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    }</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html#afe3199caa2e50c70e8625abbb8ab38e4">   67</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_client.html#afe3199caa2e50c70e8625abbb8ab38e4">AsyncRead</a>(<a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>&amp; sock, <span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, Func func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        <a class="code" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a>-&gt;<a class="code" href="class_c_tcp_client.html#adc52c7b2c3ef1653bdc00696a8713bcc">AsyncRead</a>(*(<a class="code" href="class_c_socket.html">CSocket</a>*)(&amp;sock), buff, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ReadHandle&lt;Func&gt;(func)), invoker);</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    }</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html#ad1da681716d36e58e41e61a56c64604e">   81</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_client.html#ad1da681716d36e58e41e61a56c64604e">AsyncSend</a>(<a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>&amp; sock, <span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, Func func) {</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;         <a class="code" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a>-&gt;<a class="code" href="class_c_tcp_client.html#a780997366b252f3dd2660eebe7945d8e">AsyncSend</a>(*(<a class="code" href="class_c_socket.html">CSocket</a>*)(&amp;sock), buff, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> WriteHandleNull&lt;Func&gt;(func)), <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>);</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    }</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html#a8ff7fd9ca180c5df28f6a9e527fbdcdc">   85</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_client.html#a8ff7fd9ca180c5df28f6a9e527fbdcdc">AsyncSend</a>(<a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>&amp; sock, <span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, Func func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <a class="code" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a>-&gt;<a class="code" href="class_c_tcp_client.html#a780997366b252f3dd2660eebe7945d8e">AsyncSend</a>(*(<a class="code" href="class_c_socket.html">CSocket</a>*)(&amp;sock), buff, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> WriteHandle&lt;Func&gt;(func)), invoker);</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    }</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html#a14c502b0d90ceb4d20828f8b878ee4ce">   98</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_client.html#a14c502b0d90ceb4d20828f8b878ee4ce">Post</a>(Func func) {</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        <a class="code" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a>-&gt;<a class="code" href="class_c_tcp_client.html#aeab515db0e762611f5d25cc4a7ef0c84">Post</a>(<a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> <a class="code" href="class_post_handle_null.html">PostHandleNull&lt;Func&gt;</a>(func)), <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>);</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    }</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html#aea623f509a016e7313f646bbbf4b90d7">  102</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_client.html#aea623f509a016e7313f646bbbf4b90d7">Post</a>(Func func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        <a class="code" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a>-&gt;<a class="code" href="class_c_tcp_client.html#aeab515db0e762611f5d25cc4a7ef0c84">Post</a>(<a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> <a class="code" href="class_post_handle.html">PostHandle&lt;Func&gt;</a>(func)), invoker);</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    }</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_c_tcp_io_client.html#adab0eb30871fb90cd4806061cd3f9c8f">Run</a>() {</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a>-&gt;<a class="code" href="class_c_tcp_client.html#ab7826cd43a349d238404c1151ccf862f">Run</a>();</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    }</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160; </div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html#a28b76b0e0415f53f43a581ad848576d4">  113</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_c_tcp_io_client.html#a28b76b0e0415f53f43a581ad848576d4">Run_One</a>() {</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a>-&gt;<a class="code" href="class_c_tcp_client.html#ad7fbfb3f6993fa9a7aa22a79911b4a4c">Run_One</a>();</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    }</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160; </div>
<div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html#aad1b0557e09e101c003ae36c7aea8d30">  118</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_client.html#aad1b0557e09e101c003ae36c7aea8d30">NotifyStop</a>() {</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        <a class="code" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a>-&gt;<a class="code" href="class_c_tcp_client.html#a7c1823ebf31c685fb4e182637bed9674">NotifyStop</a>();</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    }</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html#a9610637fd6e604b36c222c32334f5a3a">  123</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_c_tcp_io_client.html#a9610637fd6e604b36c222c32334f5a3a">IsStop</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a>-&gt;<a class="code" href="class_c_tcp_client.html#a39e3e8c1477e86e3a68fd89a11e7b217">IsStop</a>();</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    }</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160; </div>
<div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html#a786b6dd01ea269a79849fb6cc6beedd7">  128</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_client.html#a786b6dd01ea269a79849fb6cc6beedd7">WaitServerStop</a>() {</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        <a class="code" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a>-&gt;<a class="code" href="class_c_tcp_client.html#aa3035e0a39e135dd8f370483545c3e3f">WaitServerStop</a>();</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    }</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160; </div>
<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html#a5e7895d97e4c364c67b6cdd0790f29ea">  133</a></span>&#160;    <a class="code" href="class_c_basic_service.html">CBasicService</a>* <a class="code" href="class_c_tcp_io_client.html#a5e7895d97e4c364c67b6cdd0790f29ea">GetTcpServicePtr</a>() {</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        <span class="keywordflow">return</span> dynamic_cast&lt;CBasicService*&gt;(<a class="code" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a>.<a class="code" href="class_shared_ptr.html#a0f15d2d3d2834b0667791f3abfd9e0d7">Get</a>());</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    }</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160; </div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">  138</a></span>&#160;    <a class="code" href="class_shared_ptr.html">SharedPtr&lt;CTcpClient&gt;</a> <a class="code" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a>;</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;};</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160; </div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;<a class="code" href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160; </div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;<span class="preprocessor">#endif // __TCPIOCLIENTEX_H__</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclass_c_tcp_client_html_a7f7c9ed8793c499fd560ca3af10a4e62"><div class="ttname"><a href="class_c_tcp_client.html#a7f7c9ed8793c499fd560ca3af10a4e62">CTcpClient::AsyncConnect</a></div><div class="ttdeci">virtual void AsyncConnect(CSocket &amp;sock, const SharedPtr&lt; HandleBase &gt; &amp;func, void *invoker=NullPtr)</div><div class="ttdoc">投递一个接收连接请求</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_client_8cpp_source.html#l00058">TcpClient.cpp:58</a></div></div>
<div class="ttc" id="aclass_c_tcp_client_html"><div class="ttname"><a href="class_c_tcp_client.html">CTcpClient</a></div><div class="ttdef"><b>Definition:</b> <a href="_tcp_client_8h_source.html#l00020">TcpClient.h:20</a></div></div>
<div class="ttc" id="aclass_c_sock_error_html"><div class="ttname"><a href="class_c_sock_error.html">CSockError</a></div><div class="ttdoc">套接字错误信息类</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00013">SockError.h:13</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_ab6fce95f05e531d5c3a5d6a020b009ed"><div class="ttname"><a href="class_c_tcp_io_client.html#ab6fce95f05e531d5c3a5d6a020b009ed">CTcpIoClient::Init</a></div><div class="ttdeci">CSockError Init(CTcpIoSocket &amp;sock, bool isServer=false)</div><div class="ttdoc">初始化套接字与服务类设备进行绑定</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00032">TcpIoClient.h:32</a></div></div>
<div class="ttc" id="aclass_c_stream_iteator_html"><div class="ttname"><a href="class_c_stream_iteator.html">CStreamIteator</a></div><div class="ttdef"><b>Definition:</b> <a href="_stream_byte_8h_source.html#l00011">StreamByte.h:11</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_a2e8d159bd627ceeda4d87f284ba23e6a"><div class="ttname"><a href="class_c_tcp_io_client.html#a2e8d159bd627ceeda4d87f284ba23e6a">CTcpIoClient::delete_class_copy_operator</a></div><div class="ttdeci">delete_class_copy_operator(CTcpIoClient)</div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_af68b6c887a2e48874d8172a7c206fe59"><div class="ttname"><a href="class_c_tcp_io_client.html#af68b6c887a2e48874d8172a7c206fe59">CTcpIoClient::AsyncConnect</a></div><div class="ttdeci">void AsyncConnect(CTcpIoSocket &amp;sock, Func func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00049">TcpIoClient.h:49</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html"><div class="ttname"><a href="class_shared_ptr.html">SharedPtr&lt; HandleBase &gt;</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html_a0f15d2d3d2834b0667791f3abfd9e0d7"><div class="ttname"><a href="class_shared_ptr.html#a0f15d2d3d2834b0667791f3abfd9e0d7">SharedPtr::Get</a></div><div class="ttdeci">Ty * Get()</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00202">SharedPtr.h:202</a></div></div>
<div class="ttc" id="aclass_c_tcp_client_html_aa3035e0a39e135dd8f370483545c3e3f"><div class="ttname"><a href="class_c_tcp_client.html#aa3035e0a39e135dd8f370483545c3e3f">CTcpClient::WaitServerStop</a></div><div class="ttdeci">virtual void WaitServerStop()</div><div class="ttdoc">通知服务停止并等待</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_client_8cpp_source.html#l00131">TcpClient.cpp:131</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_aea623f509a016e7313f646bbbf4b90d7"><div class="ttname"><a href="class_c_tcp_io_client.html#aea623f509a016e7313f646bbbf4b90d7">CTcpIoClient::Post</a></div><div class="ttdeci">void Post(Func func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00102">TcpIoClient.h:102</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_a9610637fd6e604b36c222c32334f5a3a"><div class="ttname"><a href="class_c_tcp_io_client.html#a9610637fd6e604b36c222c32334f5a3a">CTcpIoClient::IsStop</a></div><div class="ttdeci">bool IsStop() const</div><div class="ttdoc">判断服务是否已经停止</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00123">TcpIoClient.h:123</a></div></div>
<div class="ttc" id="aclass_c_tcp_client_html_adc52c7b2c3ef1653bdc00696a8713bcc"><div class="ttname"><a href="class_c_tcp_client.html#adc52c7b2c3ef1653bdc00696a8713bcc">CTcpClient::AsyncRead</a></div><div class="ttdeci">virtual void AsyncRead(CSocket &amp;sock, const CStreamIteator &amp;buff, const SharedPtr&lt; HandleBase &gt; &amp;func, void *invoker=NullPtr)</div><div class="ttdoc">投递一个接收请求</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_client_8cpp_source.html#l00071">TcpClient.cpp:71</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_a8ff7fd9ca180c5df28f6a9e527fbdcdc"><div class="ttname"><a href="class_c_tcp_io_client.html#a8ff7fd9ca180c5df28f6a9e527fbdcdc">CTcpIoClient::AsyncSend</a></div><div class="ttdeci">void AsyncSend(CTcpIoSocket &amp;sock, const CStreamIteator &amp;buff, Func func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00085">TcpIoClient.h:85</a></div></div>
<div class="ttc" id="aclass_c_tcp_client_html_ad7fbfb3f6993fa9a7aa22a79911b4a4c"><div class="ttname"><a href="class_c_tcp_client.html#ad7fbfb3f6993fa9a7aa22a79911b4a4c">CTcpClient::Run_One</a></div><div class="ttdeci">virtual bool Run_One()</div><div class="ttdoc">运行一次服务</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_client_8cpp_source.html#l00116">TcpClient.cpp:116</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_a5e7895d97e4c364c67b6cdd0790f29ea"><div class="ttname"><a href="class_c_tcp_io_client.html#a5e7895d97e4c364c67b6cdd0790f29ea">CTcpIoClient::GetTcpServicePtr</a></div><div class="ttdeci">CBasicService * GetTcpServicePtr()</div><div class="ttdoc">获取底层服务类</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00133">TcpIoClient.h:133</a></div></div>
<div class="ttc" id="aclass_c_tcp_client_html_ab7826cd43a349d238404c1151ccf862f"><div class="ttname"><a href="class_c_tcp_client.html#ab7826cd43a349d238404c1151ccf862f">CTcpClient::Run</a></div><div class="ttdeci">virtual bool Run()</div><div class="ttdoc">运行服务</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_client_8cpp_source.html#l00111">TcpClient.cpp:111</a></div></div>
<div class="ttc" id="aclass_c_tcp_client_html_a9ed08affa5b7292535374a40bdb3a74b"><div class="ttname"><a href="class_c_tcp_client.html#a9ed08affa5b7292535374a40bdb3a74b">CTcpClient::Init</a></div><div class="ttdeci">virtual CSockError Init(CSocket &amp;sock, bool isServer=false)</div><div class="ttdoc">将sock与tcp绑定，一个socket只能绑定一个tcp服务类</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_client_8cpp_source.html#l00035">TcpClient.cpp:35</a></div></div>
<div class="ttc" id="atools_8h_html_a201ce692c9dca6599e5c12d00167419b"><div class="ttname"><a href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div><div class="ttdeci">#define DEF_BEG_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00036">tools.h:36</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_a965f48bb734bddf47d931d09cc502d92"><div class="ttname"><a href="class_c_tcp_io_client.html#a965f48bb734bddf47d931d09cc502d92">CTcpIoClient::~CTcpIoClient</a></div><div class="ttdeci">~CTcpIoClient()</div><div class="ttdoc">销毁一个tcp io客户端类</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00024">TcpIoClient.h:24</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_a9ff74ee2f85db45be210500111f07746"><div class="ttname"><a href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">CTcpIoClient::_service</a></div><div class="ttdeci">SharedPtr&lt; CTcpClient &gt; _service</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00138">TcpIoClient.h:138</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_a5108d1e20ddf728920483c7c7b071e3f"><div class="ttname"><a href="class_c_tcp_io_client.html#a5108d1e20ddf728920483c7c7b071e3f">CTcpIoClient::AsyncConnect</a></div><div class="ttdeci">void AsyncConnect(CTcpIoSocket &amp;sock, Func func)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00045">TcpIoClient.h:45</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_afe3199caa2e50c70e8625abbb8ab38e4"><div class="ttname"><a href="class_c_tcp_io_client.html#afe3199caa2e50c70e8625abbb8ab38e4">CTcpIoClient::AsyncRead</a></div><div class="ttdeci">void AsyncRead(CTcpIoSocket &amp;sock, const CStreamIteator &amp;buff, Func func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00067">TcpIoClient.h:67</a></div></div>
<div class="ttc" id="a_tcp_client_8h_html"><div class="ttname"><a href="_tcp_client_8h.html">TcpClient.h</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_ad1da681716d36e58e41e61a56c64604e"><div class="ttname"><a href="class_c_tcp_io_client.html#ad1da681716d36e58e41e61a56c64604e">CTcpIoClient::AsyncSend</a></div><div class="ttdeci">void AsyncSend(CTcpIoSocket &amp;sock, const CStreamIteator &amp;buff, Func func)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00081">TcpIoClient.h:81</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_a786b6dd01ea269a79849fb6cc6beedd7"><div class="ttname"><a href="class_c_tcp_io_client.html#a786b6dd01ea269a79849fb6cc6beedd7">CTcpIoClient::WaitServerStop</a></div><div class="ttdeci">void WaitServerStop()</div><div class="ttdoc">通知服务停止并等待</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00128">TcpIoClient.h:128</a></div></div>
<div class="ttc" id="aclass_c_socket_html"><div class="ttname"><a href="class_c_socket.html">CSocket</a></div><div class="ttdoc">套接口类</div><div class="ttdef"><b>Definition:</b> <a href="_socket_8h_source.html#l00030">Socket.h:30</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_adab0eb30871fb90cd4806061cd3f9c8f"><div class="ttname"><a href="class_c_tcp_io_client.html#adab0eb30871fb90cd4806061cd3f9c8f">CTcpIoClient::Run</a></div><div class="ttdeci">bool Run()</div><div class="ttdoc">运行服务</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00108">TcpIoClient.h:108</a></div></div>
<div class="ttc" id="aclass_c_tcp_client_html_a7c1823ebf31c685fb4e182637bed9674"><div class="ttname"><a href="class_c_tcp_client.html#a7c1823ebf31c685fb4e182637bed9674">CTcpClient::NotifyStop</a></div><div class="ttdeci">virtual void NotifyStop()</div><div class="ttdoc">通知服务停止</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_client_8cpp_source.html#l00121">TcpClient.cpp:121</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_ae429cb6f2a0a0e7cea6ff0652acd92a0"><div class="ttname"><a href="class_c_tcp_io_client.html#ae429cb6f2a0a0e7cea6ff0652acd92a0">CTcpIoClient::CTcpIoClient</a></div><div class="ttdeci">CTcpIoClient(bool isWriteLog=false)</div><div class="ttdoc">构造一个tcp io客户端类</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00019">TcpIoClient.h:19</a></div></div>
<div class="ttc" id="atools_8h_html_ac909db71799bb22cb7d636a34cd785e4"><div class="ttname"><a href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div><div class="ttdeci">#define DEF_END_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00038">tools.h:38</a></div></div>
<div class="ttc" id="aclass_post_handle_html"><div class="ttname"><a href="class_post_handle.html">PostHandle</a></div><div class="ttdoc">用户投递回调</div><div class="ttdef"><b>Definition:</b> <a href="_sock_tools_8h_source.html#l00242">SockTools.h:242</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_a28b76b0e0415f53f43a581ad848576d4"><div class="ttname"><a href="class_c_tcp_io_client.html#a28b76b0e0415f53f43a581ad848576d4">CTcpIoClient::Run_One</a></div><div class="ttdeci">bool Run_One()</div><div class="ttdoc">运行服务一次</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00113">TcpIoClient.h:113</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html_a0b0a4c8396bf40f91994f729855c0a5a"><div class="ttname"><a href="class_shared_ptr.html#a0b0a4c8396bf40f91994f729855c0a5a">SharedPtr::Reset</a></div><div class="ttdeci">void Reset(Ty *p)</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00175">SharedPtr.h:175</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_a14c502b0d90ceb4d20828f8b878ee4ce"><div class="ttname"><a href="class_c_tcp_io_client.html#a14c502b0d90ceb4d20828f8b878ee4ce">CTcpIoClient::Post</a></div><div class="ttdeci">void Post(Func func)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00098">TcpIoClient.h:98</a></div></div>
<div class="ttc" id="aclass_c_tcp_client_html_aeab515db0e762611f5d25cc4a7ef0c84"><div class="ttname"><a href="class_c_tcp_client.html#aeab515db0e762611f5d25cc4a7ef0c84">CTcpClient::Post</a></div><div class="ttdeci">virtual void Post(const SharedPtr&lt; HandleBase &gt; &amp;func, void *invoker=NullPtr)</div><div class="ttdoc">投递一个中断请求</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_client_8cpp_source.html#l00098">TcpClient.cpp:98</a></div></div>
<div class="ttc" id="aclass_c_tcp_client_html_a780997366b252f3dd2660eebe7945d8e"><div class="ttname"><a href="class_c_tcp_client.html#a780997366b252f3dd2660eebe7945d8e">CTcpClient::AsyncSend</a></div><div class="ttdeci">virtual void AsyncSend(CSocket &amp;sock, const CStreamIteator &amp;buff, const SharedPtr&lt; HandleBase &gt; &amp;func, void *invoker=NullPtr)</div><div class="ttdoc">投递一个写请求</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_client_8cpp_source.html#l00084">TcpClient.cpp:84</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html"><div class="ttname"><a href="class_c_tcp_io_client.html">CTcpIoClient</a></div><div class="ttdoc">tcp io 客户端服务类</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00011">TcpIoClient.h:11</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_a6802e9a74061274065a7a7f23687e30f"><div class="ttname"><a href="class_c_tcp_io_client.html#a6802e9a74061274065a7a7f23687e30f">CTcpIoClient::AsyncRead</a></div><div class="ttdeci">void AsyncRead(CTcpIoSocket &amp;sock, const CStreamIteator &amp;buff, Func func)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00063">TcpIoClient.h:63</a></div></div>
<div class="ttc" id="atools_8h_html_ab689500aaec0db066e3ac9483d3fe425"><div class="ttname"><a href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a></div><div class="ttdeci">#define NullPtr</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00119">tools.h:119</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_client_html_aad1b0557e09e101c003ae36c7aea8d30"><div class="ttname"><a href="class_c_tcp_io_client.html#aad1b0557e09e101c003ae36c7aea8d30">CTcpIoClient::NotifyStop</a></div><div class="ttdeci">void NotifyStop()</div><div class="ttdoc">通知服务停止</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_client_8h_source.html#l00118">TcpIoClient.h:118</a></div></div>
<div class="ttc" id="aclass_post_handle_null_html"><div class="ttname"><a href="class_post_handle_null.html">PostHandleNull</a></div><div class="ttdef"><b>Definition:</b> <a href="_sock_tools_8h_source.html#l00255">SockTools.h:255</a></div></div>
<div class="ttc" id="aclass_c_basic_service_html"><div class="ttname"><a href="class_c_basic_service.html">CBasicService</a></div><div class="ttdoc">服务类 基类</div><div class="ttdef"><b>Definition:</b> <a href="_service_base_8h_source.html#l00015">ServiceBase.h:15</a></div></div>
<div class="ttc" id="aclass_c_tcp_client_html_a39e3e8c1477e86e3a68fd89a11e7b217"><div class="ttname"><a href="class_c_tcp_client.html#a39e3e8c1477e86e3a68fd89a11e7b217">CTcpClient::IsStop</a></div><div class="ttdeci">virtual bool IsStop() const</div><div class="ttdoc">判断服务是否停止</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_client_8cpp_source.html#l00126">TcpClient.cpp:126</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html"><div class="ttname"><a href="class_c_tcp_io_socket.html">CTcpIoSocket</a></div><div class="ttdoc">用于tcp进行io投递的套接字类</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00017">TcpIoSocket.h:17</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
